﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Marmat.Forms
{

    partial class SearchControl
    {
        public class Group : ISearchControlField
        {
            public string Name { get; set; }

            public string Caption { get; set; }

            public string Domain { get; set; }

            public bool ConvertValue(string txt,out object value)
            {
                value = null;
                string name = string.IsNullOrEmpty(this.Caption) ? this.Name : this.Caption;
                return name.Contains(txt);
            }
        }
    }

}
